package work1;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //开发一学生基本信息管理系统
        Scanner scanner=new Scanner(System.in);
        List<Student> list=new ArrayList<>();
        StudentManage studentManage=new StudentManage();
        //基础信息
        list.add(new Student("1","张三","男","计算机","2021级"));
        list.add(new Student("2","李四","男","计算机","2021级"));
        list.add(new Student("3","王五","男","计算机","2021级"));
        list.add(new Student("4","小红","女","大数据","2021级"));
        int chose=-1;
        while (true){
            System.out.println("**************");
            System.out.println("请输入你的选择:");
            System.out.println("1-->增加学生信息");
            System.out.println("2-->删除学生信息");
            System.out.println("3-->修改学生信息");
            System.out.println("4-->查询学生信息");
            System.out.println("5-->显示学生信息");
            System.out.println("0-->退出信息系统");
            System.out.println("**************");
            chose=scanner.nextInt();
            switch (chose) {
                case 1:
                  studentManage.add(list);
                  break;
                case 2:
                    studentManage.delete(list);
                    break;
                case 3:
                    studentManage.revise(list);
                    break;
                case 4:
                    studentManage.select(list);
                    break;
                case 5:
                    studentManage.show(list);
                    break;
                case 0:
                    studentManage.exit();
                    break;
            }
        }
    }
}